package com.lanou.utp.mapper;

import com.lanou.utp.entity.*;
import com.lanou.utp.utils.IdAndName;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author MaQingYun
 */
@Mapper
public interface CollegeMapper {

    School getOrgs();

    List<Major> getMajors(Long collegeId);

    List<IdAndName> getLeaderByClazzId(Long id);

    List<IdAndName> getLeaderByMajorId(Long id);

    List<IdAndName> getLeader();

    void addCollege(@Param("leader_id") Long leaderId, @Param("name") String name, @Param("school_id") Long parentId);

    void addMajor(@Param("leader_id") Long leaderId, @Param("name") String name, @Param("college_id") Long parentId);

    void updateCollege(@Param("parameter") OrgCommonProperty parameter);

    void updateMajor(@Param("parameter") OrgCommonProperty parameter);

    void deleteCollege(@Param("parameter") OrgCommonProperty parameter);

    void deleteMajor(@Param("parameter") OrgCommonProperty parameter);

    List<College> getCollegesWithSchool();
}
